package org.pulloid.android;

import java.io.InputStream;

import org.pulloid.Cursor;
import org.pulloid.CursorDef;

public class AndroidCursorDef extends CursorDef<Record> {
	
	PulloidAdapter adapter;

	public AndroidCursorDef(AndroidElementContext ctx) {
		super(Record.class, ctx);
		this.adapter = ctx.adapter;
	}
	
	@Override
	public Cursor<Record> pull(InputStream input) {
		Cursor<Record> c = super.pull(input);
		this.adapter.cursor = c;
		return c;
	}
	
	@Override
	public AndroidElementContext getContext() {
		return (AndroidElementContext)super.getContext();
	}
	
}
